package com.meisupic.copyright.domain.po;

import java.sql.Timestamp;
import java.util.Objects;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "abn_vip_order", schema = "copy_right", catalog = "")
public class AbnVipOrderPo {

  private Integer id;
  private Integer userId;
  private Integer vipGoodsId;
  private String outTradeNo;
  private Integer totalFee;
  private Integer priceOriginal;
  private Integer couponId;
  private Timestamp addTime;
  private Timestamp payTime;
  private Integer payWay;
  private Integer state;

  @Id
  @Column(name = "id", nullable = false)
  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  @Basic
  @Column(name = "user_id", nullable = false)
  public Integer getUserId() {
    return userId;
  }

  public void setUserId(Integer userId) {
    this.userId = userId;
  }

  @Basic
  @Column(name = "vip_goods_id", nullable = false)
  public Integer getVipGoodsId() {
    return vipGoodsId;
  }

  public void setVipGoodsId(Integer vipGoodsId) {
    this.vipGoodsId = vipGoodsId;
  }

  @Basic
  @Column(name = "out_trade_no", nullable = false, length = 64)
  public String getOutTradeNo() {
    return outTradeNo;
  }

  public void setOutTradeNo(String outTradeNo) {
    this.outTradeNo = outTradeNo;
  }

  @Basic
  @Column(name = "total_fee", nullable = false)
  public Integer getTotalFee() {
    return totalFee;
  }

  public void setTotalFee(Integer totalFee) {
    this.totalFee = totalFee;
  }

  @Basic
  @Column(name = "price_original", nullable = false)
  public Integer getPriceOriginal() {
    return priceOriginal;
  }

  public void setPriceOriginal(Integer priceOriginal) {
    this.priceOriginal = priceOriginal;
  }

  @Basic
  @Column(name = "coupon_id", nullable = false)
  public Integer getCouponId() {
    return couponId;
  }

  public void setCouponId(Integer couponId) {
    this.couponId = couponId;
  }

  @Basic
  @Column(name = "add_time", nullable = false)
  public Timestamp getAddTime() {
    return addTime;
  }

  public void setAddTime(Timestamp addTime) {
    this.addTime = addTime;
  }

  @Basic
  @Column(name = "pay_time", nullable = false)
  public Timestamp getPayTime() {
    return payTime;
  }

  public void setPayTime(Timestamp payTime) {
    this.payTime = payTime;
  }

  @Basic
  @Column(name = "pay_way", nullable = false)
  public Integer getPayWay() {
    return payWay;
  }

  public void setPayWay(Integer payWay) {
    this.payWay = payWay;
  }

  @Basic
  @Column(name = "state", nullable = false)
  public Integer getState() {
    return state;
  }

  public void setState(Integer state) {
    this.state = state;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    AbnVipOrderPo that = (AbnVipOrderPo) o;
    return Objects.equals(id, that.id) &&
        Objects.equals(userId, that.userId) &&
        Objects.equals(vipGoodsId, that.vipGoodsId) &&
        Objects.equals(outTradeNo, that.outTradeNo) &&
        Objects.equals(totalFee, that.totalFee) &&
        Objects.equals(priceOriginal, that.priceOriginal) &&
        Objects.equals(couponId, that.couponId) &&
        Objects.equals(addTime, that.addTime) &&
        Objects.equals(payTime, that.payTime) &&
        Objects.equals(payWay, that.payWay) &&
        Objects.equals(state, that.state);
  }

  @Override
  public int hashCode() {

    return Objects
        .hash(id, userId, vipGoodsId, outTradeNo, totalFee, priceOriginal, couponId, addTime,
            payTime,
            payWay, state);
  }
}
